package com.zxdemo.jpa.model;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Transient;
import javax.validation.constraints.NotNull;

/**   
* @Description: 用户实体类
* <p>Copyright: Copyright (c) 2017<／p>
* @Package com.zxdemo.jpa.model 
* @author 张翔
* @date 2017年1月19日 下午3:48:29 
* @version V1.0   
*/
@Entity
public class User implements Serializable {
	
	    private static final long serialVersionUID = 1L;
		/**
		 * 用户Id，自增
		 */
		@Id
		@GeneratedValue(strategy=GenerationType.AUTO)
		private Long userId;

		/**
		 * 用户名
		 */
		@NotNull
		private String userName;
		/**
		 * 用户密码
		 */
		private String userPassword;
		/**
		 * 用户邮箱
		 */
		private String email;
		/**
		 * 用户手机号码
		 */
		private String mobile;
		/**
		 * 用户状态,0为禁用，1为正常
		 */
		private Integer status;
		/**
		 * 创建时间
		 */
		private Date createTime;
		/**
		 * 对应角色（多角色）
		 */
		@Transient
		private List<Long> roleIdList;
		
		public Long getUserId() {
			return userId;
		}

		public void setUserId(Long userId) {
			this.userId = userId;
		}
		public List<Long> getRoleIdList() {
			return roleIdList;
		}

		public void setRoleIdList(List<Long> roleIdList) {
			this.roleIdList = roleIdList;
		}


		public String getUserPassword() {
			return userPassword;
		}

		public void setUserPassword(String userPassword) {
			this.userPassword = userPassword;
		}

		public String getEmail() {
			return email;
		}

		public void setEmail(String email) {
			this.email = email;
		}

		public String getMobile() {
			return mobile;
		}

		public void setMobile(String mobile) {
			this.mobile = mobile;
		}

		public Integer getStatus() {
			return status;
		}

		public void setStatus(Integer status) {
			this.status = status;
		}

		public Date getCreateTime() {
			return createTime;
		}

		public void setCreateTime(Date createTime) {
			this.createTime = createTime;
		}


		public String getUserName() {
			return userName;
		}

		public void setUserName(String userName) {
			this.userName = userName;
		}
		
}
